import request from '@/utils/request'

export const userApi = {
  login(data) {
    return request.post('/user/login', data)
  },

  getUserInfo() {
    return request.get('/user/info')
  },

  logout() {
    return request.post('/user/logout')
  },

}



export const photoApi = {
  getPhotoList(params) {
    return request.get('/photo/list', { params })
  },

  uploadPhoto(data) {
    return request.post('/photo/upload', data, {
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  },

  deletePhoto(id) {
    return request.delete(`/photo/${id}`)
  }
}

export const cosApi = {
  getTempSecret(data) {
    return request.post('/cos/getTempSecret', data)
  },
}

export const agentApi = {
  chatCreate(data) {
    return request.post('/graph/parallel-stream/chat/create', data)
  },
}